package com.weixin.paleituo.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Author yichao
 * Time  2018/4/1 14:17
 * Dest  ${TODO}
 */

public class ChildrenBeanX implements Parcelable {
    /**
     * children : [{"id":899,"img":"http://p35r91t1w.bkt.clouddn.com/upload/goods_list_img/37c82002-bea2-4f0d-a6f5-24531b91733e.jpg","name":"北欧风格 抛光实木内架棉麻布艺左转角沙发（3+左贵妃）","price":5000},{"id":875,"img":"http://p35r91t1w.bkt.clouddn.com/upload/goods_list_img/c0bf5ba6-f0e7-4164-9a15-ac8329f7a4f4.jpg","name":"古欧 美式圆餐桌简美餐台简约欧式风格餐厅家具奢华实木餐桌GU120","price":20000}]
     * name : 全部
     */

    private String name;
    private List<ChildrenBean> children;
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<ChildrenBean> getChildren() {
        return children;
    }

    public void setChildren(List<ChildrenBean> children) {
        this.children = children;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.name);
        dest.writeList(this.children);
    }

    public ChildrenBeanX() {
    }

    protected ChildrenBeanX(Parcel in) {
        this.name = in.readString();
        this.children = new ArrayList<ChildrenBean>();
        in.readList(this.children, ChildrenBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<ChildrenBeanX> CREATOR = new Parcelable.Creator<ChildrenBeanX>() {
        @Override
        public ChildrenBeanX createFromParcel(Parcel source) {
            return new ChildrenBeanX(source);
        }

        @Override
        public ChildrenBeanX[] newArray(int size) {
            return new ChildrenBeanX[size];
        }
    };
}
